package com.caifu.mapper;

import com.caifu.pojo.YlNursingRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * <p>
 * 护理等级记录表 Mapper 接口
 * </p>
 *
 * @author GZ
 * @since 2020-11-06
 */
public interface YlNursingRecordMapper extends BaseMapper<YlNursingRecord> {
    /**
    * 
    * 功能描述：查询护理等级名称
    * 
    * @Param   userNo 用户编号
    * @Return      
    * @Exception   
    * @Author  GZ
    * @Date   2020/11/12 17:40
    */
    @Select({"<script>",
                "select c.COST_NAME,c.COST_IMG,r.next_effect_date from yl_nursing_record r inner join yl_cost c on r.cost_no=c.COST_NO",
                "where r.is_effective='1' and  r.USER_NO=#{userNo}",
            "</script>"})
    Map<String,Object> queryUserNursingDegreeByUserNo(@Param("userNo") String userNo);
}
